package com.fsk.test.init.controller;

import com.fsk.init.dao.mapper.initMapper;
import com.fsk.init.dao.mybatisPojo.init;
import com.fsk.init.dao.mybatisPojo.initExample;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;


@RestController
@Slf4j
public class testUrl {

    @Autowired
    private initMapper initMappers;

    @GetMapping("/test/startup")
    public String startUp(@RequestParam String id) {
        initExample initExample = new initExample();
        initExample.createCriteria().andIdEqualTo(id);
        List<init> inits = initMappers.selectByExample(initExample);
        log.info("asdads{}","123asdaddd");
        return "OK，StartUp" + "   数据值:" + inits.get(0).getName();
    }
}
